package com.jiaai.member.api;

import com.jiaai.exception.ServerException;
import com.jiaai.member.model.VWallet;
import com.jiaai.member.model.VWalletHistorySearch;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * TODO
 * </p>
 *
 * @author 佳爱网络科技
 * @version V1.0
 * @title IWalletAPI
 * @since 2017/11/10
 */
public interface IWalletAPI {
    /**
     * @param mId
     * @return
     */
    Object findBymId(String mId)throws ServerException;
    
    void updateMoney(VWallet  wallet)throws ServerException;

    /**
     * 获取钱包历史
     * @param search
     * @return
     */
    public List<Map<String,Object>>  findByWalletHistory(VWalletHistorySearch search)throws ServerException;

    /**
     * 提现
     * @param mId 用户Id
     * @param glod 提现额度
     * @return
     * @throws ServerException
     */
    public void   tx(String mId,Integer glod)throws ServerException;

    BigDecimal getMyMoney(String mId);

    /*
    =========================================后台================================
     */
    /**
     * 后台查询列表
     * @param curr
     * @return
     */
    Object backWalletQuery(Integer curr, String mId, String nickName);

    /**
     * 充值
     * @param mId
     * @param money
     */
    void recharge(String mId, Integer money);
}
